UNLOAD

Section: User Commands (1)
Updated: 29 August 1995
Index Return to Main Contents
 

NAME

unload, eject, load - load/unload SCSI devices  

SYNOPSIS

load [ device ] [ 0 | 1 ]
eject [ device ] [ 0 | 1 ]
unload [ device ] [ 0 | 1 ]

 

DESCRIPTION

Eject or unload allows removable SCSI-devices (such as CD-ROM's) to be ejected under software control.

Load allows SCSI-devices that support automatic medium loading (like the Toshiba(TM) XM3601 CD-ROM) to be loaded under software control.

If no device is specified, the default ( /dev/sgc ) is used.

If called as load it tries to load the specified SCSI-device. No action is taken, if the device is already loaded.

If called as unload or eject it tries to eject the specified device. This should fail if the medium is mounted (see BUGS later in this manpage). Nothing happens if the medium is already ejected. Don't use this command on normal harddisks, as strange things may happen. If the motor of a harddisk stops, try a load - this should start your HD again.

 

OPTIONS

device
This option specifies a different name of the SCSI generic device. Currently the default is determined in the source file so this option is used to override it. Make sure to specify a valid generic SCSI device filename.

0
Load the medium. This overrides the default behavior if invoked as eject or unload.

1
Eject the medium. This overrides the default behavior if invoked as load.

The SCSI generic device files are mapped following this scheme: First the devices of the first SCSI controller in order of their ID.

Example: Three devices are attached to a controller. At ID 0 is an internal harddisk. At ID 2 we have a removeable disk (eighter a SyQuest or a ZIP-drive) and at ID 5 a CD-ROM drive. Assuming that all devices are powered at boot time, we got this mapping: Harddisk (ID 0) is assigned to /dev/sga. The removeable disk (ID 2) is assigned to /dev/sgb and the CD-ROM is assigned to /dev/sgc.

If these devices are missing on your system then you should do a 'cd /dev' and a 'MAKEDEV sg' to create the nessesary files.

/dev/sga - First LUN of first ID at first Controller.
/dev/sgb - Next LUN if available or first LUN of next ID if available or first LUN of first ID of next Controller if available.
/dev/sgc - ...
   :

 

BUGS

You probably shouldn't be able to eject a mounted medium, but some kernel drivers might allow it. With a CD-ROM this should not be harmfull because a CD is a read-only device. But with removeable harddisks such as SyQuest(tm) or Iomega(tm) ZIP-drive it can corrupt your filesystem (on the medium). To prevent this, make sure to unmount the according drives and to ensure to use the right SCSI generic device.

 

TODO

Check first if the device is a removeable medium.
Use an Environment variable as an alternative methode to specify a different device.

 

AUTHOR

UnLoad was written by Juergen P. Meier (Jor@muecke.rz.fh-muenchen.de) and comes under the conditions of the GNU General Public License. See the file COPYING for details.

 

FILES

/dev/sg[a-f] - Generic SCSI device files.

 

SEE ALSO

mount(2), umount(2), mount(8), umount(8)


 

Index

NAME
SYNOPSIS
DESCRIPTION
OPTIONS
BUGS
TODO
AUTHOR
FILES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 15:55:47 GMT, November 05, 2024